﻿using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Logistics;
using System.Collections.Generic;
using Nop.Core.Domain.Catalog;

namespace Nop.Core.Domain.Directory
{
    /// <summary>
    /// Represents a region. Typically it is an area combined with district, which users can leverage logistics service.
    /// </summary>
    public class Region : BaseEntity, ILocalizedEntity
    {
        private ICollection<District> _districts;
        private ICollection<RegionProductVariant> _regionProductVariants;

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public virtual string Name { get; set; }

        /// <summary>
        /// The display order of the zones
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets the 
        /// </summary>
        public virtual ICollection<District> Districts
        {
            get { return _districts ?? (_districts = new List<District>()); }
            protected set { _districts = value; }
        }

        /// <summary>
        /// Gets or sets the regioned product variants
        /// </summary>
        public virtual ICollection<RegionProductVariant> RegionProductVariants
        {
            get { return _regionProductVariants ?? (_regionProductVariants = new List<RegionProductVariant>()); }
            protected set { _regionProductVariants = value; }
        }
    }
}
